<div class="main-blocks">
    <div class="heading-main-blocks">
        <h4>Tin tức</h4>
    </div>
    
    <div class="content-main-blocks">
    <?php
        if(count($this->data) > 0) :
        $common = new Admincp_Model_Common();
        $i = 1;
        foreach($this->data as $value) :
    ?>
    <?php if($i == 1) : ?>
        <div class="news-first">
    <?php else : ?>
        <div class="news">
    <?php endif; ?>
            <a href="<?php echo $this->url(array('action'=>'detail','controller'=>'news','module'=>'default','id'=>$value['id'],'title'=>$value['url']),'newsdetail'); ?>" title="<?php echo $value['title'] ?>">
                <img class="news-image" src="<?php echo $this->baseUrl('/public/files/news/').$value['image']; ?>" />
            </a>
            
            <div class="news-main">
                <a class="news-title" href="<?php echo $this->url(array('action'=>'detail','controller'=>'news','module'=>'default','id'=>$value['id'],'title'=>$value['url']),'newsdetail'); ?>">
                    <?php echo $value['title'] ?>
                </a>
                
                <p class="news-date">Ngày đăng: <?php echo $common->formatDateSite($value['create_date']); ?></p>
                
                <div class="news-content">
                    <?php echo $value['short_description']; ?>
                </div>
                
                <a class="news-continue" href="<?php echo $this->url(array('action'=>'detail','controller'=>'news','module'=>'default','id'=>$value['id'],'title'=>$value['url']),'newsdetail'); ?>">
                    Xem chi tiết
                </a>
            </div>
        </div>
    <?php
        $i++;
        endforeach;
        else :
    ?>
        <p>Hiện không có bài viết nào</p>
    <?php endif; ?>
    <?php if(count($this->data) > 0) : ?>
    <div class="pagination">
        <?php echo $this->paginationControl($this->data, 'Sliding', 'news/pagination.phtml'); ?>
    </div>
    <?php endif; ?>
    </div>
</div>
<!-- End .main-blocks -->